unit FRM_CONSULTA_FUNCIONARIOS;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FRM_PADRAO, ExtCtrls, DynamicSkinForm, StdCtrls, SkinCtrls,
  SkinGrids, spDBGrids, DB, pngimage;

type
  TFrmListaFuncionarios = class(TForm2)
    DataSource1: TDataSource;
    lbl_busca: TEdit;
    LinkLabel1: TLinkLabel;
    procedure lbl_buscaChange(Sender: TObject);
    procedure BtnNovoClick(Sender: TObject);
    procedure spSkinButton1Click(Sender: TObject);
    procedure spSkinButton2Click(Sender: TObject);
    //procedure spSkinButton2Click(Sender: TObject);
    //procedure spSkinButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmListaFuncionarios: TFrmListaFuncionarios;

implementation

uses FRM_CADASTRO_FUNCIONARIOS;

{$R *.dfm}

procedure TFrmListaFuncionarios.BtnNovoClick(Sender: TObject);
begin
  inherited;
frmcadfuncionarios.show;
frmCadFuncionarios.DataSource1.DataSet.Insert;
end;

procedure TFrmListaFuncionarios.lbl_buscaChange(Sender: TObject);
begin
  inherited;
if lbl_busca.Text <> '' then
BEGIN
DataSource1.DataSet.Filtered := False;
DataSource1.DataSet.Filter := ' upper (FUNNOME) LIKE ''%'+ UpperCase(lbl_busca.Text)+'%'' ';
DataSource1.DataSet.Filtered := true;
END
else
DataSource1.DataSet.Filtered := false;
end;

procedure TFrmListaFuncionarios.spSkinButton1Click(Sender: TObject);
begin
  inherited;
frmCadFuncionarios.Show;
frmCadFuncionarios.DataSource1.DataSet.Edit;


end;

procedure TFrmListaFuncionarios.spSkinButton2Click(Sender: TObject);
begin
  inherited;
DataSource1.DataSet.Delete;
end;

end.
